package demo_10_net;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class BasicSocketClient {
public static void main(String[] args) {
	try {
		Socket s=new Socket(InetAddress.getLocalHost(),8888);
		BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));
		System.out.println(br.readLine());
		br.close();
		s.close();
	} catch (UnknownHostException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
}
}
